$(document).ready(function () {

	$('#enabled').bootstrapSwitch({
		onText: "启用",      // 设置ON文本  
		offText: "禁用",    // 设置OFF文本  
		//onColor : "success",// 设置ON文本颜色(info/success/warning/danger/primary)  
		//offColor : "warning",  // 设置OFF文本颜色 (info/success/warning/danger/primary)  
		size: "small",    // 设置控件大小,从小到大  (mini/small/normal/large)  
		// 当开关状态改变时触发  
		onSwitchChange: function (event, state) {
			if (state == true) {
				document.getElementById("SMPS_GARP_TIMEINTVAL_MS").setAttribute('readonly', true);
				document.getElementById("SMPS_GARP_ONCE_ARPPACKS").setAttribute('readonly', true);
				document.getElementById("SMPS_GARP_ONCE_INTVALMS").setAttribute('readonly', true);
				document.getElementById("SMPS_GARP_RTDATA_IFNAME").setAttribute('readonly', true);
			} else {
				document.getElementById("SMPS_GARP_TIMEINTVAL_MS").readOnly=false;
				document.getElementById("SMPS_GARP_ONCE_ARPPACKS").readOnly=false;
				document.getElementById("SMPS_GARP_ONCE_INTVALMS").readOnly=false;
				document.getElementById("SMPS_GARP_RTDATA_IFNAME").readOnly=false;
			}
		}
	});



	document.getElementById("SMPS_GARP_TIMEINTVAL_MS").value = "6000";
	document.getElementById("SMPS_GARP_ONCE_ARPPACKS").value = "1";
	document.getElementById("SMPS_GARP_ONCE_INTVALMS").value = "1000";
	document.getElementById("SMPS_GARP_RTDATA_IFNAME").value = "ens33";



});




